# coding: UTF-8
# Filename : chain_part_data_model.py
# Company : imedia
# Author : zqz
# -*-coding:utf-8 -*-

#xml头文件
xml_head = '''<?xml version="1.0" encoding="UTF-8" ?>'''
imedia_start = '''<imedia>'''
imedia_end = '''</imedia>'''

imedia_info_s = '''<info>'''
imedia_info_body = '''<slogan>{slogan}</slogan>'''
imedia_info_e = '''</info>'''

imedia_body_product = '''
<product>
<id>{id}</id>
<name>{name}</name>
<category>{category}</category>
<image>{image}</image>
<storeinapp>{storeinapp}</storeinapp>
<description><![CDATA[{description}]]></description>
</product>
'''
imedia_body_part = '''
<part>
<id>{id}</id>
<name>{name}</name>
<address>{address}</address>
<image>{image}</image>
<tel>{tel}</tel>
<longitude>{longitude}</longitude>
<latitude>{latitude}</latitude>
<storeinapp>{storeinapp}</storeinapp>
<description><![CDATA[{description}]]></description>
</part>
'''
imedia_body_activity = '''
<activity>
<id>{id}</id>
<name>{name}</name>
<category>{category}</category>
<from>{from}</from>
<to>{to}</to>
<image>{image}</image>
<storeinapp>{storeinapp}</storeinapp>
<description><![CDATA[{description}]]></description>
</activity>
'''
#验证失败
key_error = xml_head + '''
<imedia>
<error>
<code>000</code>
<msg>通信验证失败</msg>
</error>
</imedia>
'''
